.clearfix::after{
    content: "";
    display: block;
    clear: both;
}

.header{
    background: #e3e4e5;
    color: #999;
    height: 40px;
    line-height: 40px;
    position: fixed;
    width: 100%;
}

.header .topnav>li{
    float: left;
    margin: 0 15px;
    padding: 0 8px;
    width: 150px;
    text-align: center;
    height: 40px;
    
    box-sizing: border-box;
    position: relative;
}

.header .topnav>li:hover{
    background: #fff;
    border: 2px solid red;

    border-bottom: none;
    line-height: 36px;
}

.header .topnav>li .submenu{
    text-align: left;
    line-height: 1.5;
    width: 300px;
    border: 2px solid red;
    background: #fff;

    box-sizing: border-box;
    display: none;
    position: absolute;
    right: -2px;
}

.header .topnav>li:hover .submenu{
    display: block;
}

.header .topnav>li:hover::after{
    content: "";
    background: #fff;
    position: absolute;
    width: 100%;
    height: 5px;
    bottom: 0;
    left: 0;
}